/**
 * Created by Administrator on 2017/6/19.
 */
var mongoose = require('../db/db');
var UserSchema = require('../schemas/user');

UserSchema.static('findAll', function (callback) {
  return this.find({}).sort({time: 1}).exec(callback);
});

module.exports = mongoose.model('User', UserSchema);